package com.kexio.enterprise.integration.file.metadata;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 文件元数据
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class FileMetadata {
    private String fileId;
    private String fileName;
    private String originalFileName;
    private String filePath;
    private String fileUrl;
    private String contentType;
    private long fileSize;
    private String etag;
    private String storageType;
    private String bucket;
    private LocalDateTime uploadTime;
    private LocalDateTime lastModified;
    private LocalDateTime accessTime;
    private LocalDateTime expireTime;
    private boolean temporary;
    private boolean encrypted;
    private String checksum;
    private Map<String, String> customMetadata;
    private Map<String, Object> tags;
    private boolean directory;
    private String storageClass;

    public FileMetadata() {
        this.temporary = false;
        this.encrypted = false;
        this.directory = false;
        this.storageType = "LOCAL";
    }

    // Getters and Setters
    public String getFileId() { return fileId; }
    public void setFileId(String fileId) { this.fileId = fileId; }
    
    public String getFileName() { return fileName; }
    public void setFileName(String fileName) { this.fileName = fileName; }
    
    public String getOriginalFileName() { return originalFileName; }
    public void setOriginalFileName(String originalFileName) { this.originalFileName = originalFileName; }
    
    public String getFilePath() { return filePath; }
    public void setFilePath(String filePath) { this.filePath = filePath; }
    
    public String getFileUrl() { return fileUrl; }
    public void setFileUrl(String fileUrl) { this.fileUrl = fileUrl; }
    
    public String getContentType() { return contentType; }
    public void setContentType(String contentType) { this.contentType = contentType; }
    
    public long getFileSize() { return fileSize; }
    public void setFileSize(long fileSize) { this.fileSize = fileSize; }
    
    public String getEtag() { return etag; }
    public void setEtag(String etag) { this.etag = etag; }
    
    public String getStorageType() { return storageType; }
    public void setStorageType(String storageType) { this.storageType = storageType; }
    
    public String getBucket() { return bucket; }
    public void setBucket(String bucket) { this.bucket = bucket; }
    
    public LocalDateTime getUploadTime() { return uploadTime; }
    public void setUploadTime(LocalDateTime uploadTime) { this.uploadTime = uploadTime; }
    
    public LocalDateTime getLastModified() { return lastModified; }
    public void setLastModified(LocalDateTime lastModified) { this.lastModified = lastModified; }
    
    public LocalDateTime getAccessTime() { return accessTime; }
    public void setAccessTime(LocalDateTime accessTime) { this.accessTime = accessTime; }
    
    public LocalDateTime getExpireTime() { return expireTime; }
    public void setExpireTime(LocalDateTime expireTime) { this.expireTime = expireTime; }
    
    public boolean isTemporary() { return temporary; }
    public void setTemporary(boolean temporary) { this.temporary = temporary; }
    
    public boolean isEncrypted() { return encrypted; }
    public void setEncrypted(boolean encrypted) { this.encrypted = encrypted; }
    
    public String getChecksum() { return checksum; }
    public void setChecksum(String checksum) { this.checksum = checksum; }
    
    public Map<String, String> getCustomMetadata() { return customMetadata; }
    public void setCustomMetadata(Map<String, String> customMetadata) { this.customMetadata = customMetadata; }
    
    public Map<String, Object> getTags() { return tags; }
    public void setTags(Map<String, Object> tags) { this.tags = tags; }
    
    public boolean isDirectory() { return directory; }
    public void setDirectory(boolean directory) { this.directory = directory; }
    
    public String getStorageClass() { return storageClass; }
    public void setStorageClass(String storageClass) { this.storageClass = storageClass; }
    
    // 别名方法以兼容旧代码
    public LocalDateTime getCreateTime() { return uploadTime; }
    public void setCreateTime(LocalDateTime createTime) { this.uploadTime = createTime; }
    
    public LocalDateTime getModifiedTime() { return lastModified; }
    public void setModifiedTime(LocalDateTime modifiedTime) { this.lastModified = modifiedTime; }
    
    public Map<String, String> getMetadata() { return customMetadata; }
    public void setMetadata(Map<String, String> metadata) { this.customMetadata = metadata; }
}
